/*
 * Copyright (c) 2017 Qunar.com. All Rights Reserved.
 */
package com.guoyu.project.model;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.guoyu.project.common.utils.ImageURLSerialize;
import com.guoyu.project.model.enums.ArticleStatus;
import com.guoyu.project.model.enums.ArticleType;
import com.guoyu.project.model.enums.PrivilegeLevel;

/**
 * @author: libo Date: 17-5-25 Time: 上午11:00
 * @version: \$Id$
 */
public class Article extends BaseModel {

    /**
     * 一级分类
     */
    private ArticleType majorType;
    /**
     * 二级分类
     */
    private String minorType;
    /**
     * 学校
     */
    private int schoolId;
    /**
     * 项目id
     */
    private int projectId;
    /**
     * 文章来源
     */
    private String source;
    /**
     * 作者
     */
    private String author;
    /**
     * 新闻标题
     */
    private String title;

    /**
     * 新闻简介
     */
    private String summary;

    /**
     * 新闻内容
     */
    private String content;

    /**
     * 新闻图片
     */
    @JsonSerialize(using = ImageURLSerialize.class)
    private String picture;

    /**
     * 发布时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date pubdate;

    /**
     * 浏览次数
     */
    private int readCount;

    /**
     * 序号
     */
    private int displayOrder;
    /**
     * 权限级别
     */
    private PrivilegeLevel privilegeLevel;
    /**
     * 状态
     */
    private ArticleStatus status = ArticleStatus.NOT_BEGIN;

    /**
     * 是否首页热点推荐
     */
    private boolean displayHome;
    /**
     * 是否二级页展示
     */
    private boolean displayDetail;

    private String schoolName;

    private String schoolPicture;

    private int previousId;

    private int nextId;

    public ArticleType getMajorType() {
        return majorType;
    }

    public void setMajorType(ArticleType majorType) {
        this.majorType = majorType;
    }

    public String getMinorType() {
        return minorType;
    }

    public void setMinorType(String minorType) {
        this.minorType = minorType;
    }

    public int getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(int schoolId) {
        this.schoolId = schoolId;
    }

    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public ArticleStatus getStatus() {
        return status;
    }

    public void setStatus(ArticleStatus status) {
        this.status = status;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public Date getPubdate() {
        return pubdate;
    }

    public void setPubdate(Date pubdate) {
        this.pubdate = pubdate;
    }

    public int getReadCount() {
        return readCount;
    }

    public void setReadCount(int readCount) {
        this.readCount = readCount;
    }

    public int getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(int displayOrder) {
        this.displayOrder = displayOrder;
    }

    public PrivilegeLevel getPrivilegeLevel() {
        return privilegeLevel;
    }

    public void setPrivilegeLevel(PrivilegeLevel privilegeLevel) {
        this.privilegeLevel = privilegeLevel;
    }

    public boolean isDisplayHome() {
        return displayHome;
    }

    public void setDisplayHome(boolean displayHome) {
        this.displayHome = displayHome;
    }

    public boolean isDisplayDetail() {
        return displayDetail;
    }

    public void setDisplayDetail(boolean displayDetail) {
        this.displayDetail = displayDetail;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public String getSchoolPicture() {
        return schoolPicture;
    }

    public void setSchoolPicture(String schoolPicture) {
        this.schoolPicture = schoolPicture;
    }

    public int getPreviousId() {
        return previousId;
    }

    public void setPreviousId(int previousId) {
        this.previousId = previousId;
    }

    public int getNextId() {
        return nextId;
    }

    public void setNextId(int nextId) {
        this.nextId = nextId;
    }

}
